import Cookies from 'js-cookie';

const cookie = {
  /*
   * 设置Cookies
   * */
  setCookie(key, value, expiresTime) {
    let seconds = expiresTime;
    let expires = new Date(new Date() * 1 + seconds * 1000);
    return Cookies.set(key, value, { expires: expires });
  },
  /*
   * 移除Cookies
   * */
  removeCookie(key) {
    return Cookies.remove(key);
  },
  /*
   * 设置cookies
   * */
  getCookie(key) {
    return Cookies.get(key);
  },
};
export default cookie;
